$(function(){
	var p ={p:null}
	  $.ajax({
		  type:"POST",
		  url:"/movie.front/loginController/showUser",
		  data:JSON.stringify(p),
		  dataType:"json",
		  contentType:"application/json",
		  success:function(data){
       var result = data.result;
		   if(result!=null){
			   $('#myaccount-login').append('<font size="3" color="white">'+result.userName+'</font>');	   
		       $('#myCart').click(function(){
		    	   window.location='http://localhost:8080/movie.web/myOrder.html?id='+result.id;
		       })
		   }
       
		  }
	
	   });
});
